extends ../layout

block content
  h2.page-header 分类列表

  table.table.table-bordered
    thead
      tr
        th 名称
        th 别名
        th 创建时间
        th 管理
    tbody
    each category in categories
      tr
        td= category.name
        td= category.slug
        td= moment(category.created).format('YYYY-MM-DD HH:mm:ss')
        td
          a(href="/posts/category/" + category.name, class="btn btn-sm btn-success", target="_blank") 查看
          &nbsp;&nbsp;
          a(href="/admin/categories/edit/" + category.id, class="btn btn-sm btn-info") 编辑
          &nbsp;&nbsp;
          a(href="/admin/categories/delete/" + category.id, class="btn btn-sm btn-danger") 删除



block scripts
  script $(document).ready(function () { console.log('kv'); });